// stores/counter.js
import { defineStore } from 'pinia';

export const useUserinfo = defineStore('userinfo', {
	state: () => {
		return { 
			hasLogin: false,
			userinfo:'',
			token: '',
			requestList: [],//在登录完成前执行的需要token的接口进行存储
			publicInfo: '',
			isAdminChecker: false,//是否是通用审核账号
		};
	},
	actions: {
		setAdminChecker(data) {
			this.isAdminChecker = data;
		},
		setPublicInfo(data) {
			this.publicInfo = data;
		},
		setUserinfo(data) {
			this.userinfo = data;
		},
		setToken(data) {
			this.token = data;
		},
		setRequestList(data) {
			this.requestList = data;
		},
		setLogin(data) {
			this.hasLogin = data;
		}
	},
});
